<template>
	<view>
		<view class="vi1">
			<view class="vi2">
				<view class="flex-row wrapper">
					<u-image class="im"
						:src="user.picture"
						width="112rpx" height="112rpx" shape="circle"></u-image>
					<view class="flex-col flex-row wraper-col vi3">
						<view class="u-line-1 text">{{user.name}}</view>
						<view class="u-line-1 text-two">产品部/产品经理</view>
					</view>
				</view>
			</view>
		</view>

		<view v-for="(item, index) in socialList" :key="item.sid" :ref="'item'+index" @click="onclick(item)">
			<uni-card :title="item.time"  >
				<view>
					<text class="uni-body text1">社保：</text>
					<text class="uni-body text2">{{item.shebao}}</text>
				</view>
				<view>
					<text class="uni-body text1">公积金：</text>
					<text class="uni-body text2">{{item.gongjijin}}</text>
				</view>

			</uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollable: true,
				socialList: [],
				user:{}
			}
		},
		created() {
			this.user=uni.getStorageSync('user')
			console.log(this.user)
			//获取用户头像
			uni.request({
				url: "http://localhost:8007/conference/social/getIdPic/"+this.user.eid,
				method: 'get',
				success: (res) => {
					console.log(res)
					this.user.picture = res.data.data.p.picture
					// console.log(this.dataList[0].paytime.)
				}
			})
			uni.request({
				url: "http://localhost:8007/conference/social/findAll",
				method: 'get',
				success: (res) => {
					console.log(res)
					this.socialList = res.data.data.list
					// console.log(this.dataList[0].paytime.)
				}
			})
		},
		methods: {
			onclick(e) {
				uni.navigateTo({
					url: "./sociallist?sid=" + e.sid,
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	/*  头部开始	  */
	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
	}

	.text {
		width: 73px;
		margin-bottom: 14px;
		font-size: 20px;
	}

	.text-two {
		width: 100%;
		font-size: 12px;
	}

	.vi1 {
		width: 91%;
		height: 80px;
		background-color: white;
		margin: 10px 0px 0px 15px;
	}

	.vi2 {
		float: left;
		margin: 15px 0px 0px 20px;
	}

	.vi3 {
		margin: 0px 0px 0px 20px;
	}

	/* 头部结束	 */
	.text1 {
		font-size: 20px;
	}

	.text2 {
		font-size: 20px;
		color: #ff9900;
	}

	.im {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.text-two {
		width: 100%;
		font-size: 12px;
	}
</style>
